PUT Audio
Overview
The following table contains information about the PUT method for managing the process of updating a specific audio.
| PUT Audio | |
|---|---|
| Method | PUT |
| URL or Endpoint | /api/v1/projectId/audios |
| Headers | Authorization |
| Parameters | projectId |
| Body | Check the request body below. |
The description of the URL parameter is as follows:
| projectId Parameter | |
|---|---|
| URL Parameter Name | projectId |
| Mandatory | Yes |
| Type | string |
| Description | Unique Id of the project. |
Request Body
{
"publicId": "string",
"title": "string",
"description": "string",
"source": "string",
"author": "string",
"publishStartDate": "2024-05-28T11:44:17.062Z",
"publishEndDate": "2024-05-28T11:44:17.063Z",
"link": "string",
"chapterState": true,
"customParameters": [
{
"key": "string",
"value": "string"
}
],
"chapters": [
{
"title": "string",
"time": 0
}
]
}
Information about the fields that appear on the request body are displayed in the table below.
| Parameter Name | Mandatory | Type | Description |
|---|---|---|---|
| publicId | Yes | string | Unique identifier of the audio |
| title | No | string | Title of the audio |
| description | No | string | Description of the audio |
| source | No | string | Source of the audio |
| author | No | string | Author of the audio |
| publishStartDate | No | string | Start date of audio publishing |
| publishEndDate | No | string | End date of audio publishing |
| link | No | string | Link associated with the audio |
| chapterState | No | boolean | State of audio chapters |
| customParameters | No | array of objects | Custom parameters for the audio |
| key | No | string | Key for custom parameter |
| value | No | string | Value for custom parameter |
| chapters | No | array of objects | Chapters associated with the audio |
| title | No | string | Title of the chapter |
| time | No | number | Time in seconds when the chapter ends |
Response
{
"success": true,
"errors": [],
"messages": [],
"result": {
"publicId": "{audioId}",
"title": "{title}",
"description": "{description}",
"source": "",
"author": "",
"publishStatusName": null,
"thumbnail": "https://cdn.vpplayer.tech/{projectId}/audio-encode/{audioId}/thumbnails/retina.jpg",
"canEmbed": true,
"link": "",
"chapterState": true,
"duration": null,
"publishStartDate": null,
"publishEndDate": null,
"insertDate": "2024-05-28T11:05:43.4117897",
"customParameters": [],
"chapters": [
{
"title": "Chapter 1",
"time": 50
},
{
"title": "Chapter 2",
"time": 93
}
]
},
"resultInfo": null,
"statusCode": 200
}
Information about the fields that appear when you receive the response are displayed in the table below.
| Field Name | Type | Description |
|---|---|---|
| success | bool | If the response is successful it will return true. Otherwise will return false |
| errors | array[string] | Indicates if there was an error |
| messages | array[string] | Returns the response message from back-end |
| result | array[Object] | Returns the response object |
| publicId | string | The unique Id of the audio |
| title | string | Title of the audio |
| description | string | Description of the audio |
| source | string | The source of the audio. |
| author | string | The author of the audio. |
| publishStatusName | string | Name of the publish status. |
| thumbnail | string | URL of the audio's thumbnail image |
| canEmbed | bool | Indicates whether the audio can be embedded. |
| link | string | Url of the embed. |
| chapterState | bool | Indicates whether chapters are enabled |
| duration | string | Duration of the audio in seconds |
| publishStartDate | Date | Date and time when the audio was published |
| publishEndDate | Date | Date and time when audio will not be available. |
| insertDate | Date | Date and time when the audio was inserted |
| customParameters | array[Object] | An array of custom parameters. |
| chapters | array[Object] | Returns an array of chapters. |
| title | string | The title of the chapter. |
| time | integer($int32) | The end time for the specific chapter. |
| resultInfo | string | Returns extra information about the result |
| statusCode | integer($int32) | Returns the HTTP Status Code |
If the action is successful, the service sends back an HTTP 200 or 201 response.
Errors
For information about the errors that are common to all actions, see Common Errors:
HTTP Status Code 400: Bad Request
HTTP Status Code 401: Unauthorized
HTTP Status Code 403: Forbidden
HTTP Status Code 404: Result Not Found
HTTP Status Code 500: Internal Server Error
HTTP Status Code 503: Backend Fetch Failed